package com.example.userconsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.userapi.model.TRsult;
import com.example.userapi.service.UserServerInterface;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by IntelliJ IDEA2021.3
 *
 * @Author: Tenghw
 * @Date: 2022/11/01  21:42
 * @Description:
 */
@RestController
public class UserController {
    @Reference(version = "1.0",group = "tenghw",loadbalance = "user-provider")
    UserServerInterface userServerInterface;

    @GetMapping("getUserInfo")
    public TRsult getUserInfo(@RequestParam("name") String name,@RequestParam("passwd") String passwd){
        return userServerInterface.getUserInfo(name,passwd);
    }
}
